package 动态数组.线性表;

import java.util.Comparator;

/**
 * 集合的抽象类的定义
 * @param <E>
 */
public interface List<E> extends Iterable<E> {
    public void add(E element);
    public void add(int index,E element);
    public void remove(E element);
    public  E remove(int index);
    public E get(int index);
    public E set(int index,E element);
    public int size();
    public int indexOf(E element);
    public boolean contains(E element);
    public boolean isEmpty();
    public void clear();
    public void sort(Comparator<E> c);
    public List<E> subList(int fromIndex,int toIndex);
}
